﻿using UnityEngine;
using Yoozoo.UI.YGUI;

namespace Yoozoo.Gameplay.RTS
{
    public class MarchHudLod1 : MonoBehaviour
    {
        /// <summary>
        /// 绿点背景
        /// </summary>
        public YImage GreenPointBg;

        public YImage arrow;
        /// <summary>
        /// 主将头像
        /// </summary>
        public ComCommander MainCommander;

        /// <summary>
        /// 采集图标
        /// </summary>
        public YImage SelfCollectIcon;

        public YImage OtherCollectIcons;
        private bool _otherCollectBgEnabled = false;
       
        public long Tid = 0L;
        public virtual void SetOtherCollectIconEnable(bool enable)
        {
            if (_otherCollectBgEnabled != enable)
            {
                OtherCollectIcons.enabled = enable;
                _otherCollectBgEnabled = enable;
            }
        }
        public virtual void SetCollectTeamIcon(int team,long tid)
        {
            string iconName;
            switch (team)
            {
                case 0:
                    iconName = "icon_do_6";
                    break;
                case 1:
                    iconName = "icon_do_6_blue";
                    break;
                case 2:
                    iconName = "icon_do_6_red";
                    break;
                case 3:
                    iconName = "icon_do_6_red";
                    break;
                default:
                    iconName = "icon_do_6_red";
                    break;
            }
            ArmyManager.Instance.GetRtsResourceManager().SetHeroRtsAtlasIcon(iconName, OtherCollectIcons);
            Tid = tid;
        }
    }
}
